package com.mindether.llyblog.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;

@Document(indexName = "article",type = "aritlce")
public class ArticleSearch implements Serializable {
    @Id
    private String id;
    @Field(index=true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String tag;
    @Field(index=true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String title;
    @Field(index=true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String intro;
    @Field(index=true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String content;
    char state;
    private String createtime;
    private Integer visits;
    private Integer comment;

    public String getCreatetime() {
        return createtime;
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public Integer getVisits() {
        return visits;
    }

    public void setVisits(Integer visits) {
        this.visits = visits;
    }

    public Integer getComment() {
        return comment;
    }

    public void setComment(Integer comment) {
        this.comment = comment;
    }

    public ArticleSearch(String id, String tag, String title, String intro, String content, char state, String createtime, Integer visits, Integer comment) {
        this.id = id;
        this.tag = tag;
        this.title = title;
        this.intro = intro;
        this.content = content;
        this.state = state;
        this.createtime = createtime;
        this.visits = visits;
        this.comment = comment;
    }

    public ArticleSearch() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public char getState() {
        return state;
    }

    public void setState(char state) {
        this.state = state;
    }
}
